package day2;

/**
 * @author oldliu
 * @since 1.0
 */
public class IntTest4 {
    public static void main(String[] args) {
        System.out.println(Integer.toHexString(22));
        System.out.println(Integer.toHexString(-22));
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
        int i=0x16f;//16进制
        int j=016;//8进制
        int k=0b10110;//2进制
        System.out.println(i);
        System.out.println(j);
        System.out.println(k);
        System.out.println(">>>>>>>>>>>>>>>>>>>");
        int a=10000;
        System.out.println(Integer.toBinaryString(a));
        byte b=(byte)a;//取了最后一个字节
        System.out.println(b);
        int a2=a&0x000000FF;//清除某个字节上的数，变成0
        System.out.println(a2);
        Integer g=a;
        System.out.println(g.byteValue());
    }
}
